﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Configuration;
using System.Web.Configuration;
using System.Text;

public partial class Roles_Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
            // Set the root path of the Web application that contains the
            // Web.config file that you want to access.
            string configPath = "~/Scripts";

            // Get the configuration object to access the related Web.config file.
            Configuration config = WebConfigurationManager.OpenWebConfiguration(configPath);

            // Get the object related to the <identity> section.
            AuthorizationSection section =
              (AuthorizationSection)config.GetSection("system.web/authorization");

            // Read the <identity> section.
            StringBuilder identity = new StringBuilder();
            identity.Append("authorization: ");
            identity.Append(section.SectionInformation);

            // Display the <identity> information.
            ConfigId.Text = identity.ToString();
    }
}